<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
   <style>
         .red{color: red;}
                .yellow{background: rgb(0, 225, 255)}
                .fsize{font-size: 20px;}      
   </style>
</head>
<body>
    <div id="app"></div>
</body>
<script src="https://unpkg.com/vue@next"></script>
<script>
    const app=Vue.createApp({
        data(){
            return{
                message:'hello',
                classString:'fsize red yellow',
                classObject:{red:false,yellow:false,fsize:true},
                classArray:['red','yellow',{fsize:false}],
                styleString:'background:yellow',
                styleObject:{color:'red',background:'yellow'}
            }
        },
        template:`
        <div class='red yellow fsize'>hello Vue.js</div>
        <div :class='classString'>hello classString  Vue.js</div>
        <div :class='classObject'>hello ClassObject Vue.js</div>
        <div :class='classArray'>hello ClassArray Vue.js</div>
        <deml :class='classString'/>
        ===============================
        <div style='color:red;fong-size;50px;'>hello Vue.js</div>
        <div :style='styleString'>Hello styleString Vue.js</div>
        <div :style='styleObject'>Hello styleObject Vue.js</div>
        `
    })
    app.component('demo',{
        template:`
        <div :class="$attrs.class">I ’m demo1 component</div>
        <div :class="$attrs.class">I ’m  demo2 component</div>
        `
        
      
    });
    const vm=app.mount("#app");
</script>
</html>